#/bin/bash

docker ps | grep ice-admin &>/dev/null
if [ $? -eq 0 ]; then
  echo " stoping ice-admin!!!"
  docker stop ice-admin
fi

docker ps -a | grep ice-admin &>/dev/null
if [ $? -eq 0 ]; then
  echo "removeing ice-admin !!!"
  docker rm ice-admin
fi

docker run \
  -u root \
  -d --name ice-admin \
  -p 8003:80 \
  ice-admin:lastest

docker rmi pre/ice-admin:pre
